package com.beimi.game.action;

import com.beimi.game.MJService;
import com.beimi.game.player.GamePlayer;
import com.beimi.net.AbstractGameCmd;

public class ProcessMessageAction extends IAction {
	private String data;
	private AbstractGameCmd cmd;
	private GamePlayer player;
	
	public ProcessMessageAction(AbstractGameCmd abstractGameCmd, GamePlayer player, String data) {
		this.cmd = abstractGameCmd;
		this.player = player;
		this.data = data;
	}

	@Override
	public void execute(Object object) {
		cmd.execute((MJService) object, player, data);
		finished();
	}
	
}
